package com.hui.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @BelongsProject: demo
 * @BelongsPackage: com.hui.entity
 * @Author: HUI
 * @CreateTime: 2021-12-08 11:30
 * @Description:
 */
@Data
@TableName("news")
public class News {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private String title;
    private String content;
    private String author;

    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)//插入和更新时默认为上架,所以更新时间
    private Date time;//出版日期


}
